namespace ext.util
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Reusable data formatting functions</summary>
	/// <definedin>src\util\Format.js</definedin>
	/// <definedin>src\util\Format.js</definedin>
	[ScriptName("Format")]
	[ScriptNamespace("Ext.util")]
	[Imported()]
	public partial class Format
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		internal Format()
		{
		}
		#endregion
		
		#region Methods
		/// <summary>Truncate a string and add an ellipsis (&apos;...&apos;) to the end if it exceeds the specified length</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The string to truncate</param>
		/// <param name="length">The maximum length to allow before truncating</param>
		/// <param name="word">True to try to find a common work break</param>
		/// <returns>The converted text</returns>
		[ScriptName("ellipsis")]
		public string Ellipsis(string value, System.Number length, bool word)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Checks a reference and converts it to empty string if it is undefined</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">Reference to check</param>
		/// <returns>Empty string if converted, otherwise the original value</returns>
		[ScriptName("undef")]
		public object Undef(object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Checks a reference and converts it to the default value if it&apos;s empty</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">Reference to check</param>
		/// <param name="defaultValue">The value to insert of it&apos;s undefined (defaults to &quot;&quot;)</param>
		[ScriptName("defaultValue")]
		public string DefaultValue(object value, string defaultValue)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Convert certain characters (&amp;, &lt;, &gt;, and &apos;) to their HTML character equivalents for literal display in web pages.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The string to encode</param>
		/// <returns>The encoded text</returns>
		[ScriptName("htmlEncode")]
		public string HtmlEncode(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Convert certain characters (&amp;, &lt;, &gt;, and &apos;) from their HTML character equivalents.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The string to decode</param>
		/// <returns>The decoded text</returns>
		[ScriptName("htmlDecode")]
		public string HtmlDecode(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Trims any whitespace from either side of a string</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text to trim</param>
		/// <returns>The trimmed text</returns>
		[ScriptName("trim")]
		public string Trim(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns a substring from within an original string</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The original text</param>
		/// <param name="start">The start index of the substring</param>
		/// <param name="length">The length of the substring</param>
		/// <returns>The substring</returns>
		[ScriptName("substr")]
		public string Substr(string value, System.Number start, System.Number length)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Converts a string to all lower case letters</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text to convert</param>
		/// <returns>The converted text</returns>
		[ScriptName("lowercase")]
		public string Lowercase(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Converts a string to all upper case letters</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text to convert</param>
		/// <returns>The converted text</returns>
		[ScriptName("uppercase")]
		public string Uppercase(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Converts the first character only of a string to upper case</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text to convert</param>
		/// <returns>The converted text</returns>
		[ScriptName("capitalize")]
		public string Capitalize(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns a date rendering function that can be reused to apply a date format multiple times efficiently</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="format">Any valid date format string</param>
		/// <returns>The date formatting function</returns>
		[ScriptName("dateRenderer")]
		public System.Function DateRenderer(string format)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Strips all HTML tags</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text from which to strip tags</param>
		/// <returns>The stripped text</returns>
		[ScriptName("stripTags")]
		public string StripTags(object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Strips all script tags</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The text from which to strip script tags</param>
		/// <returns>The stripped text</returns>
		[ScriptName("stripScripts")]
		public string StripScripts(object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// It does simple math for use in a template, for example: 
		/// var tpl = new Ext.Template(&apos;{value} * 10 = {value:math(&quot;* 10&quot;)}&apos;);
		/// </summary>
		/// <htmlSummary>
		/// It does simple math for use in a template, for example:&lt;pre&gt;&lt;code&gt;
		/// var tpl = new Ext.Template(&apos;{value} * 10 = {value:math(&quot;* 10&quot;)}&apos;);
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\util\Format.js</definedin>
		/// <returns>A function that operates on the passed value.</returns>
		[ScriptName("math")]
		public System.Function Math()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Formats the number according to the format string.
		/// examples (123456.789):
		/// 
		/// 0 - (123456) show only digits, no precision
		/// </summary>
		/// <htmlSummary>
		/// Formats the number according to the format string.
		/// &lt;div style=&quot;margin-left:40px&quot;&gt;examples (123456.789):
		/// &lt;div style=&quot;margin-left:10px&quot;&gt;
		/// 0 - (123456) show only digits, no precision&lt;br&gt;
		/// 0.00 - (123456.78) show only digits, 2 precision&lt;br&gt;
		/// 0.0000 - (123456.7890) show only digits, 4 precision&lt;br&gt;
		/// 0,000 - (123,456) show comma and digits, no precision&lt;br&gt;
		/// 0,000.00 - (123,456.78) show comma and digits, 2 precision&lt;br&gt;
		/// 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision&lt;br&gt;
		/// To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.
		/// For example: 0.000,00/i
		/// &lt;/div&gt;&lt;/div&gt;
		/// </htmlSummary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="v">The number to format.</param>
		/// <param name="format">The way you would like to format this text.</param>
		/// <returns>The formatted number.</returns>
		[ScriptName("number")]
		public string Number(System.Number v, string format)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns a number rendering function that can be reused to apply a number format multiple times efficiently</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="format">Any valid number format string for {@link #number}</param>
		/// <returns>The number formatting function</returns>
		[ScriptName("numberRenderer")]
		public System.Function NumberRenderer(string format)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Converts newline characters to the HTML tag &amp;lt;br/&gt;</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="The">string value to format.</param>
		/// <returns>The string with embedded &amp;lt;br/&gt; tags in place of newlines.</returns>
		[ScriptName("nl2br")]
		public string Nl2br(string The)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Format a number as US currency</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The numeric value to format</param>
		/// <returns>The formatted currency string</returns>
		[ScriptName("usMoney")]
		public string UsMoney(System.Number value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Format a number as US currency</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The numeric value to format</param>
		/// <returns>The formatted currency string</returns>
		[ScriptName("usMoney")]
		public string UsMoney(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Parse a value into a formatted date using the specified format pattern.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to format (Strings must conform to the format expected by the javascript Date object&apos;s &lt;a href=&quot;http://www.w3schools.com/jsref/jsref_parse.asp&quot;&gt;parse()&lt;/a&gt; method)</param>
		/// <param name="format">Any valid date format string (defaults to &apos;m/d/Y&apos;)</param>
		/// <returns>The formatted date string</returns>
		[ScriptName("date")]
		public string Date(string value, string format)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Parse a value into a formatted date using the specified format pattern.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to format (Strings must conform to the format expected by the javascript Date object&apos;s &lt;a href=&quot;http://www.w3schools.com/jsref/jsref_parse.asp&quot;&gt;parse()&lt;/a&gt; method)</param>
		/// <param name="format">Any valid date format string (defaults to &apos;m/d/Y&apos;)</param>
		/// <returns>The formatted date string</returns>
		[ScriptName("date")]
		public string Date(System.DateTime value, string format)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Parse a value into a formatted date using the specified format pattern.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to format (Strings must conform to the format expected by the javascript Date object&apos;s &lt;a href=&quot;http://www.w3schools.com/jsref/jsref_parse.asp&quot;&gt;parse()&lt;/a&gt; method)</param>
		/// <returns>The formatted date string</returns>
		[ScriptName("date")]
		public string Date(string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Parse a value into a formatted date using the specified format pattern.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to format (Strings must conform to the format expected by the javascript Date object&apos;s &lt;a href=&quot;http://www.w3schools.com/jsref/jsref_parse.asp&quot;&gt;parse()&lt;/a&gt; method)</param>
		/// <returns>The formatted date string</returns>
		[ScriptName("date")]
		public string Date(System.DateTime value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Simple format for a file size (xxx bytes, xxx KB, xxx MB)</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="size">The numeric value to format</param>
		/// <returns>The formatted file size</returns>
		[ScriptName("fileSize")]
		public string FileSize(System.Number size)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Simple format for a file size (xxx bytes, xxx KB, xxx MB)</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="size">The numeric value to format</param>
		/// <returns>The formatted file size</returns>
		[ScriptName("fileSize")]
		public string FileSize(string size)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Rounds the passed number to the required decimal precision.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The numeric value to round.</param>
		/// <param name="precision">The number of decimal places to which to round the first parameter&apos;s value.</param>
		/// <returns>The rounded value.</returns>
		[ScriptName("round")]
		public System.Number Round(System.Number value, System.Number precision)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Rounds the passed number to the required decimal precision.</summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The numeric value to round.</param>
		/// <param name="precision">The number of decimal places to which to round the first parameter&apos;s value.</param>
		/// <returns>The rounded value.</returns>
		[ScriptName("round")]
		public System.Number Round(string value, System.Number precision)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selectively do a plural form of a word based on a numeric value. For example, in a template,
		/// {commentCount:plural(&quot;Comment&quot;)} would result in &quot;1 Comment&quot; if commentCount was 1 or would be &quot;x Comments&quot;
		/// if the value is 0 or greater than 1.
		/// </summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to compare against</param>
		/// <param name="singular">The singular form of the word</param>
		/// <param name="plural">The plural form of the word (defaults to the singular with an &quot;s&quot;)</param>
		[ScriptName("plural")]
		public void Plural(System.Number value, string singular, string plural)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Selectively do a plural form of a word based on a numeric value. For example, in a template,
		/// {commentCount:plural(&quot;Comment&quot;)} would result in &quot;1 Comment&quot; if commentCount was 1 or would be &quot;x Comments&quot;
		/// if the value is 0 or greater than 1.
		/// </summary>
		/// <definedin>src\util\Format.js</definedin>
		/// <param name="value">The value to compare against</param>
		/// <param name="singular">The singular form of the word</param>
		[ScriptName("plural")]
		public void Plural(System.Number value, string singular)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
